﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;

namespace Futurism.Universal.Foundation
{
    public class GridRegionAdapter : RegionAdapter
    {
        public override void SetContant(VisualElement region, VisualElement content)
        {
            (region as Grid).Children.Clear();
            (region as Grid).Children.Add(content as View);
        }

        public override VisualElement GetContent(VisualElement region)
        {
            return (region as Grid).Children.FirstOrDefault();
        }
    }
}
